package crmdna.interaction;

import java.util.Date;

import com.googlecode.objectify.annotation.Cache;
import com.googlecode.objectify.annotation.Entity;
import com.googlecode.objectify.annotation.Id;
import com.googlecode.objectify.annotation.Index;

import crmdna.interaction.Interaction.InteractionType;

@Entity
@Cache
public class InteractionEntity {
	@Id
	long interactionId;
	@Index
	Date timestamp;
	String interaction;
	InteractionType interactionType;
	@Index
	long userId;
	@Index
	long memberId;

	public InteractionProp toProp() {
		InteractionProp interactionProp = new InteractionProp();
		interactionProp.interactionId = interactionId;
		interactionProp.timestamp = timestamp;
		interactionProp.interaction = interaction;
		interactionProp.interactionType = interactionType;
		interactionProp.userId = userId;
		interactionProp.memberId = memberId;

		return interactionProp;
	}
}
